package org.example.api;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public class RedisList {
    public static void test1(Jedis jedis) {
        jedis.flushDB();
        jedis.rpush("key2","1","2","3","4");
        jedis.lpop("key2");
        System.out.println(jedis.llen("key2"));
        System.out.println(jedis.lrange("key2",0,-1));
    }
    public static void main(String[] args) {
        JedisPool jedisPool = new JedisPool("tcp://127.0.0.1:8888");
        try (Jedis jedis = jedisPool.getResource()){
        test1(jedis);
        }
    }
}
